<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<?php echo $this->config->static_path; ?>/css/bootstrap.min.css" rel="stylesheet">
<link href="<?php echo $this->config->static_path; ?>/css/application.css" rel="stylesheet">
<link href="<?php echo $this->config->static_path; ?>/css/bootstrap-datepicker.css" rel="stylesheet">
<script type="text/javascript"
		src="<?php echo $this->config->static_path; ?>/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
	var config = {};
	config.base_path = '<?php echo $this->config->base_path; ?>';
</script>
<style type="text/css">
body {
	padding-top: 60px;
	padding-bottom: 40px;
}

.sidebar-nav {
	padding: 9px 0;
}
</style>

</head>

<body>
	<div class="navbar navbar-fixed-top">
		<div class="navbar-inner">
			<div class="container-fluid">
				<a class="btn btn-navbar" data-toggle="collapse"
					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span>
				</a> <a class="brand" href="<?php echo $this->config->base_path; ?>">Quản lý thư viện</a>
				<div class="btn-group pull-right">
					<a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <i
						class="icon-user"></i> <?php echo $this->user['Name']; ?>
                            <span class="caret"></span>
					</a>
					<ul class="dropdown-menu">
						<!--<li><a href="#">Profile</a></li>-->
						<li class="divider"></li>
						<li><a href="<?php echo $this->config->base_path; ?>/index/logout">Sign
								Out</a></li>
					</ul>
				</div>
				<div class="nav-collapse">
					<ul class="nav">                       
                            <?php foreach($this->menu as $name => $link){ ?>                            
                            <li
							<?php if(strpos($_SERVER['REQUEST_URI'], $link) !== false) { ?>
							class="active" <?php } ?>><a
							href="<?php echo $this->config->base_path . $link; ?>"><?php echo $name; ?></a></li>
                            <?php } ?>
                        </ul>
				</div>
				<!--/.nav-collapse -->
			</div>
		</div>
	</div>
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span12">
				<div class="alert alert-error hidden" id="error-messages" style="position: fixed; top: 50px;">
					<a class="close" data-dismiss="alert" href="#">×</a>
					<h4 class="alert-heading">Có lỗi xảy ra!</h4>
					<span>&nbsp;</span>
				</div>
                            <div class="alert alert-success hidden" id="success-messages" style="position: fixed; top: 50px;">
					<a class="close" data-dismiss="alert" href="#">×</a>
					<h4 class="alert-heading">Thông báo!</h4>
					<span>&nbsp;</span>
				</div>
                    <?php
						echo $this->layout ()->content;
					?>                    
                </div>
		</div>
		<!--/row-->

		<hr>

		<footer>
			<p>&copy; Hệ thống quản lý thư viện <?php echo date('Y'); ?></p>
		</footer>

	</div>
	<!--/.fluid-container-->

	<!-- Le javascript
        ================================================== -->
	<!-- Placed at the end of the document so the pages load faster -->	
	<script
		src="<?php echo $this->config->static_path; ?>/js/bootstrap.min.js"></script>
	<script
		src="<?php echo $this->config->static_path; ?>/js/bootstrap-datepicker.js"></script>
	<script
		src="<?php echo $this->config->static_path; ?>/js/application.js"></script>
    <script
		src="<?php echo $this->config->static_path; ?>/js/jquery.form.js"></script>   
                <?php 
                    $messager = new Zend_Controller_Action_Helper_FlashMessenger(); 
                    $messages = $messager->getMessages();
                    
                    if (!empty($messages))
                    {
                ?>
                <script type="text/javascript">
                    Utils.Message.Success('<?php echo $messages[0]; ?>');                    
                </script>
                <?php
                    }
                ?>
</body>
</html>